import network  from './request'
import apiList from './apiList';


export const getUserAdverts = (data, params) => {
    return network.request({
        url: apiList.ad.getUserAdverts,
        data,
        ...params
    });
}

export const editUserAdvertReq = (data, params) => {
    return network.request({
        url: apiList.ad.editUserAdvertReq,
        data,
        ...params
    });
}

export const clickAdvert = (data, params) => {
    return network.request({
        url: apiList.ad.clickAdvert,
        data,
        ...params
    });
}

export const getUserAdvertByFrontKey = (data, params) => {
    return network.request({
        url: apiList.ad.getUserAdvertByFrontKey,
        data,
        ...params
    });
}

export const userDefaultAdvert = (data, params) => {
    return network.request({
        url: apiList.ad.userDefaultAdvert,
        data,
        ...params
    });
}

export const getAdvertById = (data, params) => {
    return network.request({
        url: apiList.ad.getAdvertById,
        data,
        ...params
    });
}
